package com.atguigu.algorithm;

public class CoinProblem {
    public static int min1(int[] arr,int aim){
        return f(arr,0,0,aim);
    }
    public static int f(int[] arr,int index,int pre,int aim){
        if(index==arr.length){
            return pre==aim?1:0;
        }
        return f(arr,index+1,pre,aim)+f(arr,index+1,pre+arr[index],aim);
    }

}
